function w=flex1d(q,E,poissons,h_elastisk,dx)
D=E*h_elastisk^3/(12*(1-poissons^2));
N=length(q);
rhoa=3200; g=9.82;

Q=fct(q);
W(1)=Q(1)/(rhoa*g);
a4=(pi/(N*dx))^4;
for k=1:N-1
    W(k+1)=Q(k+1)/(D*a4*k^4+rhoa*g);
end
w=ifct(W);